<?php
include '../../inc/db.php'; //数据库连接
$username = @$_GET['username'];  
//$username = 'admin';
$bodyid = @$_GET['bodyid'];  
$pagesize=20;

$sql = "SELECT * FROM `zy_email_body` where `bodyid` = '".$bodyid."' limit 1";
$query = mysql_query($sql, $db);
$row = mysql_fetch_array($query);
	
$arrset = array(
				"id"=>$row['bodyid'],
				"sender"=>$row['sender'],
				"addressee"=>$row['addressee2'],
				"title"=>$row['title'],
				"content"=>$row['content'],
				"sendertime"=>$row['sendertime']
			);
			
if($row['attachmentid'] != ''){
	$moduletype = "email";
	$attach_id = substr($row['attachmentid'],0,-1);
	$attach_name = substr($row['attachmentname'],0,-1);
	$arrset['attach_id'] = explode(",",$attach_id);
	$arrset['attach_name'] = explode(",",$attach_name);
}

$result = json_encode($arrset);
$callback=$_GET['jsoncallback'];  
echo $callback."($result)";  
?>